package com.pybox.api;

import com.pybox.dto.Result;
import com.pybox.entity.TModelChanges;
import com.pybox.repository.TModelChangesRepository;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;

import java.util.List;

/**
 * @author LeiYang
 * @title: TModelChangesApi
 * @projectName pybox
 * @description: TODO
 * @date 2019/7/3014:47
 */

@Slf4j
@RequestMapping("/TModelChanges")
@Api(tags = "TModelChangesApi管理接口,物品状态管理类接口")
@RestController
@ApiIgnore
public class TModelChangesApi {

    @Autowired
    private TModelChangesRepository tModelChangesRepository;


    @ApiOperation(value = "查询所有TModelChanges", notes = "查询所有TModelChanges")
    @RequestMapping(value = "/search", method = RequestMethod.GET)
    public Result<List<TModelChanges>> findAllTModelChanges() {

        List<TModelChanges> tModelChanges = tModelChangesRepository.findAll();

        return Result.ok(tModelChanges);
    }

}
